
WindToolbarModel = function() {
	this.segmented = WindSegmented.createModel();
	this.segmenteds = new Array(); 
}

WindToolbarModel.prototype.addButton = function(button) {
	this.segmented.addButton(button);
}

WindToolbarModel.prototype.createButton = function() {
	return this.segmented.createButton();
}

WindToolbarModel.prototype.getDefaultSegmented = function() {
	return this.segmented;
}

WindToolbarModel.prototype.addAdditionalSegmented = function(entry) {
	this.entries[this.entries.length] = entry;
}

WindToolbarModel.prototype.getAdditionalSegmented = function(index) {
	return this.entries[index];
}

WindToolbarModel.prototype.getNumberOfAdditionalSegmenteds = function() {
	return 1 + this.segmenteds.length;
}
	
var WindToolbar = new Object();

WindToolbar.createModel = function() {
	return new WindToolbarModel();
}

WindToolbar.createView = function(toolbarModel) {
	var toolbarView = new WindView();
	toolbarView.setCssClass("WindToolbar");
	
	var segmentedView = WindSegmented.createView(toolbarModel.getDefaultSegmented());
	toolbarView.addView(segmentedView);
		
	return toolbarView;
}


